package com.kun.video.ui.dialog;

import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.ButtonType;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;
import javafx.stage.Modality;
import javafx.stage.Window;

/**
 * 确认对话框实现
 *
 * @author gzc
 */
public class ConfirmDialog extends AbstractDialog<Boolean> {

    public ConfirmDialog(String title, Window owner) {
        this(title, null, owner);
    }

    public ConfirmDialog(String title, String iconPath, Window owner) {
        super(title, iconPath, owner, Modality.APPLICATION_MODAL);
        getDialogPane().getButtonTypes().add(ButtonType.OK);

    }

    @Override
    protected Region createCenter() {
        return null;
    }

    @Override
    protected Boolean convertResult(ButtonType buttonType) {
        return buttonType == ButtonType.OK;
    }
}